<template>
  <div>
		<dl v-for="v in list" :key="v.id">
			<dd>
				{{ v.title  }}
			</dd>
			<dt>
				<img v-for="(item, index) in v.urls" :key="index" :src="item" alt="">
			</dt>
			<dd>
				<h4>评论：{{ v.message }}</h4>
			</dd>
		</dl>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
  name: "homeView",
  computed: {
		...mapState({
			list: state => state.list
		})
  },
	methods: {
		...mapActions(['fetchList'])
	},
	mounted() {
		this.fetchList()
	}
};
</script>